<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Epigraph: cvx::OptimizationProblem Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Epigraph
   </div>
   <div id="projectbrief">Convex Optimization in C++</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>cvx</b></li><li class="navelem"><a class="el" href="classcvx_1_1OptimizationProblem.html">OptimizationProblem</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classcvx_1_1OptimizationProblem-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cvx::OptimizationProblem Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:abfe91b330b443ac84cfd587063aa244f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcvx_1_1Scalar.html">Scalar</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcvx_1_1OptimizationProblem.html#abfe91b330b443ac84cfd587063aa244f">addVariable</a> (const std::string &amp;name)</td></tr>
<tr class="memdesc:abfe91b330b443ac84cfd587063aa244f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates and returns a variable.  <a href="classcvx_1_1OptimizationProblem.html#abfe91b330b443ac84cfd587063aa244f">More...</a><br /></td></tr>
<tr class="separator:abfe91b330b443ac84cfd587063aa244f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b8a6155c7e6d772df97b443c509dab0"><td class="memItemLeft" align="right" valign="top">VectorX&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcvx_1_1OptimizationProblem.html#a4b8a6155c7e6d772df97b443c509dab0">addVariable</a> (const std::string &amp;name, size_t rows)</td></tr>
<tr class="memdesc:a4b8a6155c7e6d772df97b443c509dab0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates and returns a vector of variables.  <a href="classcvx_1_1OptimizationProblem.html#a4b8a6155c7e6d772df97b443c509dab0">More...</a><br /></td></tr>
<tr class="separator:a4b8a6155c7e6d772df97b443c509dab0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ea9bdaa633f988edf94fee34a57d2f1"><td class="memItemLeft" align="right" valign="top">MatrixX&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcvx_1_1OptimizationProblem.html#a2ea9bdaa633f988edf94fee34a57d2f1">addVariable</a> (const std::string &amp;name, size_t rows, size_t cols)</td></tr>
<tr class="memdesc:a2ea9bdaa633f988edf94fee34a57d2f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates and returns a matrix of variables.  <a href="classcvx_1_1OptimizationProblem.html#a2ea9bdaa633f988edf94fee34a57d2f1">More...</a><br /></td></tr>
<tr class="separator:a2ea9bdaa633f988edf94fee34a57d2f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0320ee7149f1e0e28e8427fa6b316f7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcvx_1_1OptimizationProblem.html#af0320ee7149f1e0e28e8427fa6b316f7">addConstraint</a> (const <a class="el" href="classcvx_1_1Constraint.html">Constraint</a> &amp;constraint)</td></tr>
<tr class="memdesc:af0320ee7149f1e0e28e8427fa6b316f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a single constraint to the problem. found.  <a href="classcvx_1_1OptimizationProblem.html#af0320ee7149f1e0e28e8427fa6b316f7">More...</a><br /></td></tr>
<tr class="separator:af0320ee7149f1e0e28e8427fa6b316f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fb876175eb892de311efd8704bdeb0e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcvx_1_1OptimizationProblem.html#a0fb876175eb892de311efd8704bdeb0e">addConstraint</a> (const std::vector&lt; <a class="el" href="classcvx_1_1Constraint.html">Constraint</a> &gt; &amp;constraints)</td></tr>
<tr class="memdesc:a0fb876175eb892de311efd8704bdeb0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add multiple constraints to the problem.  <a href="classcvx_1_1OptimizationProblem.html#a0fb876175eb892de311efd8704bdeb0e">More...</a><br /></td></tr>
<tr class="separator:a0fb876175eb892de311efd8704bdeb0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75c10fd63c47fffe804f7d3aae574eb5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcvx_1_1OptimizationProblem.html#a75c10fd63c47fffe804f7d3aae574eb5">addCostTerm</a> (const <a class="el" href="classcvx_1_1Scalar.html">Scalar</a> &amp;term)</td></tr>
<tr class="memdesc:a75c10fd63c47fffe804f7d3aae574eb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a cost term to the problem's cost function. This has to be a scalar.  <a href="classcvx_1_1OptimizationProblem.html#a75c10fd63c47fffe804f7d3aae574eb5">More...</a><br /></td></tr>
<tr class="separator:a75c10fd63c47fffe804f7d3aae574eb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9818d4e171743cab08a1480ac4c7a2af"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcvx_1_1OptimizationProblem.html#a9818d4e171743cab08a1480ac4c7a2af">getVariableValue</a> (const std::string &amp;name, double &amp;var)</td></tr>
<tr class="memdesc:a9818d4e171743cab08a1480ac4c7a2af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the value of a scalar variable.  <a href="classcvx_1_1OptimizationProblem.html#a9818d4e171743cab08a1480ac4c7a2af">More...</a><br /></td></tr>
<tr class="separator:a9818d4e171743cab08a1480ac4c7a2af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c7f53afd74d9724b2a2dbeda65bc613"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcvx_1_1OptimizationProblem.html#a1c7f53afd74d9724b2a2dbeda65bc613">getVariableValue</a> (const std::string &amp;name, Eigen::VectorXd &amp;var)</td></tr>
<tr class="memdesc:a1c7f53afd74d9724b2a2dbeda65bc613"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the value of a vector variable.  <a href="classcvx_1_1OptimizationProblem.html#a1c7f53afd74d9724b2a2dbeda65bc613">More...</a><br /></td></tr>
<tr class="separator:a1c7f53afd74d9724b2a2dbeda65bc613"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ef5ac55c726ec9fd68693040d90df13"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcvx_1_1OptimizationProblem.html#a9ef5ac55c726ec9fd68693040d90df13">getVariableValue</a> (const std::string &amp;name, Eigen::MatrixXd &amp;var)</td></tr>
<tr class="memdesc:a9ef5ac55c726ec9fd68693040d90df13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the value of a matrix variable.  <a href="classcvx_1_1OptimizationProblem.html#a9ef5ac55c726ec9fd68693040d90df13">More...</a><br /></td></tr>
<tr class="separator:a9ef5ac55c726ec9fd68693040d90df13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c2faa0df1d338baa80458e4b32008f2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcvx_1_1OptimizationProblem.html#a5c2faa0df1d338baa80458e4b32008f2">getVariable</a> (const std::string &amp;name, <a class="el" href="classcvx_1_1Scalar.html">Scalar</a> &amp;var)</td></tr>
<tr class="memdesc:a5c2faa0df1d338baa80458e4b32008f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a scalar variable that exists in the problem.  <a href="classcvx_1_1OptimizationProblem.html#a5c2faa0df1d338baa80458e4b32008f2">More...</a><br /></td></tr>
<tr class="separator:a5c2faa0df1d338baa80458e4b32008f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7b3c5e8597258031b9273c4ad33b1a6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcvx_1_1OptimizationProblem.html#ab7b3c5e8597258031b9273c4ad33b1a6">getVariable</a> (const std::string &amp;name, VectorX &amp;var)</td></tr>
<tr class="memdesc:ab7b3c5e8597258031b9273c4ad33b1a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a vector variable that exists in the problem.  <a href="classcvx_1_1OptimizationProblem.html#ab7b3c5e8597258031b9273c4ad33b1a6">More...</a><br /></td></tr>
<tr class="separator:ab7b3c5e8597258031b9273c4ad33b1a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a106f964baf1e9c6e3377ad1eccbe3638"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcvx_1_1OptimizationProblem.html#a106f964baf1e9c6e3377ad1eccbe3638">getVariable</a> (const std::string &amp;name, MatrixX &amp;var)</td></tr>
<tr class="memdesc:a106f964baf1e9c6e3377ad1eccbe3638"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a matrix variable that exists in the problem.  <a href="classcvx_1_1OptimizationProblem.html#a106f964baf1e9c6e3377ad1eccbe3638">More...</a><br /></td></tr>
<tr class="separator:a106f964baf1e9c6e3377ad1eccbe3638"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aecc236200739347500afced6697304f9"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcvx_1_1OptimizationProblem.html#aecc236200739347500afced6697304f9">getOptimalValue</a> () const</td></tr>
<tr class="memdesc:aecc236200739347500afced6697304f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the evaluated cost function. Only call this after the problem has been solved.  <a href="classcvx_1_1OptimizationProblem.html#aecc236200739347500afced6697304f9">More...</a><br /></td></tr>
<tr class="separator:aecc236200739347500afced6697304f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a922fd3425387f68eabf93c39cdd15184"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcvx_1_1OptimizationProblem.html#a922fd3425387f68eabf93c39cdd15184">getNumVariables</a> () const</td></tr>
<tr class="memdesc:a922fd3425387f68eabf93c39cdd15184"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of used variables in the problem.  <a href="classcvx_1_1OptimizationProblem.html#a922fd3425387f68eabf93c39cdd15184">More...</a><br /></td></tr>
<tr class="separator:a922fd3425387f68eabf93c39cdd15184"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a72326b2716f7b2b669a988be7a0f2248"><td class="memItemLeft" align="right" valign="top"><a id="a72326b2716f7b2b669a988be7a0f2248"></a>
std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator&lt;&lt;</b> (std::ostream &amp;os, const <a class="el" href="classcvx_1_1OptimizationProblem.html">OptimizationProblem</a> &amp;socp)</td></tr>
<tr class="separator:a72326b2716f7b2b669a988be7a0f2248"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="af0320ee7149f1e0e28e8427fa6b316f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af0320ee7149f1e0e28e8427fa6b316f7">&#9670;&nbsp;</a></span>addConstraint() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cvx::OptimizationProblem::addConstraint </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classcvx_1_1Constraint.html">Constraint</a> &amp;&#160;</td>
          <td class="paramname"><em>constraint</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a single constraint to the problem. found. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">constraint</td><td>The constraint created by <a class="el" href="constraint_8hpp.html#a19ae6dab85befb1637b466555a80dbe1" title="Create an equality constraint: lhs == rhs.">equalTo()</a>, <a class="el" href="constraint_8hpp.html#ab66996674d0127fea7f2615269365fe8" title="Create a less than or equal constraint: lhs &lt;= rhs.">lessThan()</a>, <a class="el" href="constraint_8hpp.html#acdc34f6fa683a0f38f352295dad8981f" title="Create a greater than or equal constraint: lhs &gt;= rhs.">greaterThan()</a> or <a class="el" href="constraint_8hpp.html#ac6ea445abc1a5f95514d8a67ba28ad65" title="Create a box constraint: lower &lt;= middle &lt;= upper.">box()</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a0fb876175eb892de311efd8704bdeb0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0fb876175eb892de311efd8704bdeb0e">&#9670;&nbsp;</a></span>addConstraint() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cvx::OptimizationProblem::addConstraint </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="classcvx_1_1Constraint.html">Constraint</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>constraints</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add multiple constraints to the problem. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">constraint</td><td>The constraint created by <a class="el" href="constraint_8hpp.html#a19ae6dab85befb1637b466555a80dbe1" title="Create an equality constraint: lhs == rhs.">equalTo()</a>, <a class="el" href="constraint_8hpp.html#ab66996674d0127fea7f2615269365fe8" title="Create a less than or equal constraint: lhs &lt;= rhs.">lessThan()</a>, <a class="el" href="constraint_8hpp.html#acdc34f6fa683a0f38f352295dad8981f" title="Create a greater than or equal constraint: lhs &gt;= rhs.">greaterThan()</a> or <a class="el" href="constraint_8hpp.html#ac6ea445abc1a5f95514d8a67ba28ad65" title="Create a box constraint: lower &lt;= middle &lt;= upper.">box()</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a75c10fd63c47fffe804f7d3aae574eb5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75c10fd63c47fffe804f7d3aae574eb5">&#9670;&nbsp;</a></span>addCostTerm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cvx::OptimizationProblem::addCostTerm </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classcvx_1_1Scalar.html">Scalar</a> &amp;&#160;</td>
          <td class="paramname"><em>term</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a cost term to the problem's cost function. This has to be a scalar. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">term</td><td>A scalar cost term </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="abfe91b330b443ac84cfd587063aa244f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abfe91b330b443ac84cfd587063aa244f">&#9670;&nbsp;</a></span>addVariable() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcvx_1_1Scalar.html">Scalar</a> cvx::OptimizationProblem::addVariable </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates and returns a variable. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the variable </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classcvx_1_1Scalar.html">Scalar</a> The variable </dd></dl>

</div>
</div>
<a id="a4b8a6155c7e6d772df97b443c509dab0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b8a6155c7e6d772df97b443c509dab0">&#9670;&nbsp;</a></span>addVariable() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VectorX cvx::OptimizationProblem::addVariable </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>rows</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates and returns a vector of variables. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the variable </td></tr>
    <tr><td class="paramname">rows</td><td>The number of elements in the vector </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>VectorX The vector of variables </dd></dl>

</div>
</div>
<a id="a2ea9bdaa633f988edf94fee34a57d2f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ea9bdaa633f988edf94fee34a57d2f1">&#9670;&nbsp;</a></span>addVariable() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MatrixX cvx::OptimizationProblem::addVariable </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>cols</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates and returns a matrix of variables. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the variable </td></tr>
    <tr><td class="paramname">rows</td><td>The number of rows of the matrix </td></tr>
    <tr><td class="paramname">cols</td><td>The number of columns in the matrix </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>MatrixX The matrix of variables </dd></dl>

</div>
</div>
<a id="a922fd3425387f68eabf93c39cdd15184"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a922fd3425387f68eabf93c39cdd15184">&#9670;&nbsp;</a></span>getNumVariables()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t cvx::OptimizationProblem::getNumVariables </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of used variables in the problem. </p>
<dl class="section return"><dt>Returns</dt><dd>size_t The number of variables </dd></dl>

</div>
</div>
<a id="aecc236200739347500afced6697304f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aecc236200739347500afced6697304f9">&#9670;&nbsp;</a></span>getOptimalValue()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double cvx::OptimizationProblem::getOptimalValue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the evaluated cost function. Only call this after the problem has been solved. </p>
<dl class="section note"><dt>Note</dt><dd>This value may differ from the optimal value reported by the solver.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>double </dd></dl>

</div>
</div>
<a id="a106f964baf1e9c6e3377ad1eccbe3638"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a106f964baf1e9c6e3377ad1eccbe3638">&#9670;&nbsp;</a></span>getVariable() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cvx::OptimizationProblem::getVariable </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MatrixX &amp;&#160;</td>
          <td class="paramname"><em>var</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a matrix variable that exists in the problem. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the variable </td></tr>
    <tr><td class="paramname">var</td><td>The retured matrix variable </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a5c2faa0df1d338baa80458e4b32008f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c2faa0df1d338baa80458e4b32008f2">&#9670;&nbsp;</a></span>getVariable() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cvx::OptimizationProblem::getVariable </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcvx_1_1Scalar.html">Scalar</a> &amp;&#160;</td>
          <td class="paramname"><em>var</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a scalar variable that exists in the problem. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the variable </td></tr>
    <tr><td class="paramname">var</td><td>The retured scalar variable </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab7b3c5e8597258031b9273c4ad33b1a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab7b3c5e8597258031b9273c4ad33b1a6">&#9670;&nbsp;</a></span>getVariable() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cvx::OptimizationProblem::getVariable </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VectorX &amp;&#160;</td>
          <td class="paramname"><em>var</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a vector variable that exists in the problem. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the variable </td></tr>
    <tr><td class="paramname">var</td><td>The retured vector variable </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9818d4e171743cab08a1480ac4c7a2af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9818d4e171743cab08a1480ac4c7a2af">&#9670;&nbsp;</a></span>getVariableValue() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cvx::OptimizationProblem::getVariableValue </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>var</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the value of a scalar variable. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the variable </td></tr>
    <tr><td class="paramname">var</td><td>The value stored in the variable </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9ef5ac55c726ec9fd68693040d90df13"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ef5ac55c726ec9fd68693040d90df13">&#9670;&nbsp;</a></span>getVariableValue() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cvx::OptimizationProblem::getVariableValue </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Eigen::MatrixXd &amp;&#160;</td>
          <td class="paramname"><em>var</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the value of a matrix variable. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the variable </td></tr>
    <tr><td class="paramname">var</td><td>The value stored in the variable </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a1c7f53afd74d9724b2a2dbeda65bc613"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c7f53afd74d9724b2a2dbeda65bc613">&#9670;&nbsp;</a></span>getVariableValue() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cvx::OptimizationProblem::getVariableValue </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Eigen::VectorXd &amp;&#160;</td>
          <td class="paramname"><em>var</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the value of a vector variable. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the variable </td></tr>
    <tr><td class="paramname">var</td><td>The value stored in the variable </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/<a class="el" href="problem_8hpp_source.html">problem.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20
</small></address>
</body>
</html>
